Skip to content

refactor(routes): move vault domain into routes/vault/ subpackage - #5780

Merged
RaresKeY merged 1 commit into
odysseus-dev:devfrom
ydonghao:refactor/routes-vault-to-subdir
Aug 3, 2026
Merged

refactor(routes): move vault domain into routes/vault/ subpackage#5780
RaresKeY merged 1 commit into
odysseus-dev:devfrom
ydonghao:refactor/routes-vault-to-subdir

Conversation

@ydonghao

Copy link
Copy Markdown
Contributor

Summary

Slice 2k of the route-domain reorganization (Refs #4082 / #4071). Moves the vault domain (242 lines) into routes/vault/ behind a sys.modules shim. Pure file reorganization, no behavior change.

One of three parallel low-risk slices (search, vault, webhook). The sys.modules shim handles the import ... as vr + monkeypatch.setattr pattern. Zero path-string landmines. Canonical module imports only from core/, src/, and stdlib.

How to test

python -m compileall routes/vault/ routes/vault_routes.py app.py
python -m pytest tests/ -q

Target branch

  • This PR targets dev, not main.

Linked Issue

Follows the Phase 0 architecture refactor (#4082 / #4071). One domain per PR.

Type of Change

  • Refactor / cleanup

Checklist

  • I searched open issues and open PRs — this is not a duplicate
  • This PR targets dev
  • My changes are limited to the scope described above — no unrelated refactors
  • No runtime behavior changes (pure file move + import shim)
  • Backward-compatible: old import paths keep working via shim

@github-actions github-actions Bot added the ready for review Description complete — ready for maintainer review label Jul 27, 2026
Comment thread routes/search/search_routes.py Fixed
Comment thread routes/search/search_routes.py Fixed
@ydonghao

Copy link
Copy Markdown
Contributor Author

Friendly ping for review 👋

This is one of three parallel low-risk slices (#5779 search, #5780 vault, #5781 webhook). Only the vault domain moves — a single-file, 242-line domain with zero internal routes/ coupling — into routes/vault/ behind the same sys.modules shim as all previous slices.

Both points from your #4903 review are baked in (canonical doesn't depend on shim; shim regression test included).

Note on CI: The Python tests (pytest) check fails on all PRs currently due to the pre-existing upstream bug #5718 (NameError: name 'Any' is not defined in src/agent_loop.py), not from this PR. Verified locally: the changes pass cleanly when run against a dev HEAD with #5718 fixed.

@RaresKeY @alteixeira20 — would you mind taking a look when you have a moment?

@RaresKeY RaresKeY left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update. I checked the latest head and found one scope issue that should be addressed before merge.

Findings

P2 Badge issue (scope): Keep the vault slice independent from the search relocation

  • Problem: This PR targets dev, but its commit list begins with the complete search relocation from #5779 before the vault commit. The full nine-file diff changes both routes/search/ and routes/vault/, while the readiness comment says only the vault domain moves.

  • Impact: Squash-merging this PR would land search and vault together under a vault-only review unit, duplicate or supersede #5779, and invalidate the intended per-domain check and review boundary.

  • Ask: Please rebuild the branch by cherry-picking the vault commit directly onto the latest dev so this PR contains only the vault relocation, then rerun checks and request a fresh review.

  • Location: PR commit list and file list; app.py:695 changes the search import and app.py:855 changes the vault import.

Validation

  • Compared the full two-commit diff with the vault-only second-commit delta.
  • Confirmed the vault implementation itself remains byte-for-byte preserved and its focused route/shim tests pass on a current-dev composition.

@ydonghao
ydonghao force-pushed the refactor/routes-vault-to-subdir branch from 2033ff2 to 4775f22 Compare July 29, 2026 02:06
@ydonghao

Copy link
Copy Markdown
Contributor Author

Update: rebased onto the latest dev (includes upstream fix #5735 for the NameError: Any bug). CI is now fully green — pytest passes (the earlier failure was the pre-existing upstream bug #5718, not from this PR).

Ready for review whenever convenient.

Slice 2k of the route-domain reorganization (odysseus-dev#4082/odysseus-dev#4071). Moves
vault_routes.py into routes/vault/, leaving a backward-compat
sys.modules shim. Pure file reorganization, no behavior change.
@ydonghao
ydonghao force-pushed the refactor/routes-vault-to-subdir branch from 4775f22 to 8c28637 Compare July 30, 2026 08:21
@ydonghao

Copy link
Copy Markdown
Contributor Author

Thanks @RaresKeY — good catch on the scope issue. I rebuilt the branch by cherry-picking the vault/webhook commit directly onto the latest dev (which already includes #5779). This PR now contains only the vault/webhook relocation — no search changes.

Confirmed: the commit list shows a single commit, and the file diff touches only routes/vault/ / routes/webhook/ + shim + app.py import. CI is fully green (pytest passes). Ready for re-review.

@ydonghao

ydonghao commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Hi @RaresKeY — following up on the scope issue you flagged. The branch has been rebuilt to contain only the vault relocation (single commit, no search changes — see file list). CI is fully green. Just needs a re-review whenever you have a moment. Thanks!

@RaresKeY RaresKeY left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@RaresKeY
RaresKeY merged commit 0de76c4 into odysseus-dev:dev Aug 3, 2026
19 checks passed
jdmanring pushed a commit to jdmanring/odysseus-workbench that referenced this pull request Aug 4, 2026
Brings upstream's two route-subpackage moves (odysseus-dev#5781 routes/webhook/, odysseus-dev#5780
routes/vault/) and the integration re-baseline commit.

Both moves follow the established shim pattern and the fork has zero divergence
in either domain, so this is the first promotion since integration was restored
to the documented flow.
cybervand pushed a commit to cybervand/odysseus that referenced this pull request Aug 12, 2026
…ysseus-dev#5780)

Slice 2k of the route-domain reorganization (odysseus-dev#4082/odysseus-dev#4071). Moves
vault_routes.py into routes/vault/, leaving a backward-compat
sys.modules shim. Pure file reorganization, no behavior change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review Description complete — ready for maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants